import { request } from "../../utils/request";

export const list=(data: API.Student.List)=>request.post<PageResult<UI.List>>('/student/list',data)
export const classList=()=>request.get<UI.Class[]>('class/all')
export const add=(data: API.Student.Add)=>request.post<number>('/student/add',data)
export const valid=(data: API.Student.Valid)=>request.post<number>('/student/valid_phone',data)
export const update=(data: API.Student.Update)=>request.post<null>('/student/update',data)
export const assign=(data: API.Student.Assign)=>request.post<null>('/student/assignclass',data)
export const avatarUpload=(formData:FormData)=>request.post<string>('/student/avatarupload',formData)
export const avatarUpdate=(data:API.Student.AvatarUpdate)=>request.post<string>('/student/avatarupdate',data)